import {print} from 'nc-lightapp-front';
import handlePK from './handlePK';

export default function templatePrint() {
    const {json} = this.props;
    const pk_workdispute = handlePK.get();

    const postData = {
        filename: json['cm6011-000111'], /* 国际化处理： 劳动争议*/
        funcode: '60110317',     //功能节点编码，即模板编码 写死全局appcode，才可以查找到模板
        appcode: '60110317',
        oids: [pk_workdispute]   // 单据pk  oids含有多个元素时为批量打印,
    };

    print(
        'pdf',  //支持两类: 'html'为模板打印, 'pdf'为pdf打印
        '/nccloud/hrcm/disputed/DisputedTemplatePrintAction.do',
        postData
    );
}
